<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/web/commons/global.jsp"%>

<div class="items-wrapper">
	<div class="items">
		<c:forEach items="${writeBooks }" var="writeBook">
			<div class="item item-${writeBook.enhancedDBuddhism.id }">
				<div class="top-wrapper">
					<div class="buddhism-img-tip">
						<img class="img-circle"
							src="${writeBook.enhancedDBuddhism.coverUrl }" />
					</div>
					<div class="user-info">
						<span class="name">【抄经人】：${writeBook.writeUserName }
							&nbsp;&nbsp;${writeBook.age }岁 </span> <span class="book">
							抄写经书：《${writeBook.enhancedEBookChapter.title }》 </span>
						<address class="address">${writeBook.address }</address>
						<div class="clear-both"></div>
						<time class="time">
							抄录时间：
							<fmt:formatDate value="${writeBook.createTime }"
								pattern="yyyy年MM月dd日 HH:mm:ss" />
						</time>
						<div class="clear-both"></div>
					</div>
					<div class="clear-both"></div>
				</div>
				<div class="spit-hr-1"></div>
				<div class="bottom-wrapper hid">
					<div class="buddhism-wrapper" style="float: left;">
						<span class="title"> 【南无${writeBook.enhancedDBuddhism.name }】
						</span> <img alt="供佛" class="img-rounded"
							src="${writeBook.enhancedDBuddhism.coverUrl }">
					</div>
					<div class="content-wrapper">
						<div class="top">
							<span>回向文：</span> <span>${writeBook.dedicateMerits }</span>
						</div>

						<div class="bottom">
							<span>${writeBook.writeUserName } &nbsp;&nbsp;&nbsp;
								${writeBook.gender.msg }&nbsp;&nbsp;${writeBook.age }岁</span> <br />
							<div class="spit-hr-1"></div>
							<address>【详细地址】：${writeBook.address }</address>
						</div>
					</div>
					<div class="clear-both"></div>
				</div>
			</div>
		</c:forEach>

	</div>
</div>

<div class="vertical-spacing-20"></div>
<div class="write-book-pagination-wrapper">
	<div class="content">
		<ul class="pagination page-ul">

			<c:if test="${pagination.index > 1}">
				<li class="page-item"><a href="javascript:;"
					onclick="getWriteBookList(${pagination.index - 1})">&laquo;</a></li>
				<li class="page-item"><a href="javascript:;"
					onclick="getWriteBookList(1)">首页</a></li>
			</c:if>

			<c:forEach begin="${pagination.index }" end="${pagination.index + 7}"
				varStatus="pageStatus">
				<c:if test="${pageStatus.index <= pagination.pages}">
					<c:choose>
						<c:when test="${pageStatus.first }">
							<li class="page-item cur-page"><a href="javascript:;">${pageStatus.index
																}</a></li>
						</c:when>
						<c:otherwise>
							<li class="page-item"><a href="javascript:;"
								onclick="getWriteBookList(${pageStatus.index })">${pageStatus.index
																}</a></li>
						</c:otherwise>
					</c:choose>
				</c:if>
			</c:forEach>

			<c:if test="${pagination.index < pagination.pages}">
				<li class="page-item"
					onclick="getWriteBookList(${pagination.index + 1})"><a
					href="javascript:;">&raquo;</a></li>
				<li class="page-item"
					onclick="getWriteBookList(${pagination.pages} )"><a
					href="javascript:;">尾页</a></li>
			</c:if>

			<!-- 													<li class="page-item has-more"><a href="javascript:;">&hellip;</a></li> -->
		</ul>
	</div>
</div>

<script type="text/javascript">
$(function() {
	$(
			'.write-content-wrapper .write-main-wrapper .write-main .write-main-content .items-wrapper .items .item')
			.hover(function() {
				var _this = $(this);
				_this.find(".bottom-wrapper").slideDown("fast");
			}, function() {
				var _this = $(this);
				_this.find(".bottom-wrapper").slideUp("fast");
			});
});
</script>

